POV-Ray : Newsgroups : povray.binaries.utilities : mesh to obj converter : mesh to obj converter Server Time
28 Apr 2024 17:19:00 EDT (-0400)
  mesh to obj converter  
From: ingo
Date: 25 May 2004 19:01:44
Message: <Xns94F5A773245Aseed7@news.povray.org>
Attached you'll find mesh22obj.py  A python script to convert POV-Ray's 
mesh2 to *.obj files.

Consider it software in alpha state. A lot of things can be improved.

Currently it just looks at vertex_vectors, norma_vectors, uv_vectors and 
face_indices. The rest of the mesh2 object is ignored.

It is assumed that the "triangles" in the mesh2 object are written 
counter clockwise. If they are not, normals may get inverted (this 
actually happens with the output of my mesh_macros, something to fix)

USE:
  mesh22obj.py [options] filename(s)
OPTIONS:
  -h, --help : shows this message and quits mesh22obj.py
  -n         : ignores all normals
  -u         : ignores all uv_data

Goodluck,

Ingo


Post a reply to this message


Attachments:
Download 'mesh22obj.py.txt' (9 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.